// import axios from "../../../api/gw/axios";
import axios from "axios";
// import * as api from "../../../api/gw/index.js";
import getData from "./getData";
export default function (params,relGroup,callback, errFn) {
    let options = {
        method: "post",
        url: window.api.config_host + window.api.config_ad,
        data: params,
        headers: {sessionId: getCookie("sessionId")}
    }
    axios(options).then(data => {
        if (data.status === 200 && data.data.returnCode === 1) {
            //修改成功
            console.log("发布成功");
            // console.log(data.data.data[0]);
             callback && getData(callback,relGroup);
            // callback && callback(data.data.data[0]);
        } else {
            errFn && errFn(data.data.msg);
        } 
    }).catch(err => {
        console.log(err);
        errFn && errFn();
    });
}
